Skip to content

refactor(platform): call the shared deploy-check instead of a vendored copy - #28

Merged
ExtraToast merged 1 commit into
mainfrom
refactor/shared-deploy-check
Aug 20, 2026
Merged

refactor(platform): call the shared deploy-check instead of a vendored copy#28
ExtraToast merged 1 commit into
mainfrom
refactor/shared-deploy-check

Conversation

@ExtraToast

Copy link
Copy Markdown
Contributor

platform/render-local.sh was a ~400-line copy of logic that also lived in actions/deploy-preview/run.sh, vendored into all seven service repositories. It is replaced by a wrapper around @jorisjonkers-dev/deploy-check (JorisJonkers-dev/github-workflows#94), which the deploy-preview action runs too — so a local result and a CI result cannot disagree.

Why the copy had to go

The copies drifted. The CI version parsed deployment.yml with yq and read the artifact contract; this one re-derived the same answers by grepping raw text. And this one could not run at all:

  • --output was passed the per-environment directory, but the toolkit opens it as a file → EISDIR on all five fragments
  • artifact leak-scan and artifact validate-raw-manifests are not published subcommands → E_USAGE
  • artifact emit-contract was called with --schema-version (not a flag) and without the required --deployment and --context
  • kubeconform and kustomize build were pointed at fragment documents, which both tools reject by design

Pinned values now have one home

The script no longer restates the schema version or the context digest. It reads them from this repository's own workflows, so the local check and CI are pinned by construction. That closes the drift that had already happened: the hardcoded schema version was four minor releases behind, and the context digest two republications behind, what CI used.

Prerequisites

node, plus either oras or --context-dir pointing at an already-pulled context package. The toolkit install reads npm.pkg.github.com, which needs a token even for public packages, so export GITHUB_TOKEN="$(gh auth token)" first — the wrapper picks it up, falling back to gh auth token when available.

Verification

Run in all seven repos against the current public context, via npx from the published 0.15.0 package: five fragments render, the apply bundle builds, and the contract is emitted. Six pass; knowledge exits 1 on its one real gap, now reported as no health.path on knowledge-ingest-worker rather than a bare fail.

…d copy

platform/render-local.sh was a ~400-line copy of logic that also lived in
actions/deploy-preview/run.sh, duplicated into every service repository. The
copies drifted, and this one could not run at all: it passed a directory where
--output names a file, and called artifact leak-scan and artifact
validate-raw-manifests, neither of which the toolkit publishes.

The logic now lives in @jorisjonkers-dev/deploy-check, which the deploy-preview
action runs as well, so a local result and a CI result cannot disagree. What is
left here is a wrapper that pulls the cluster context and invokes the pinned
checker.

The schema version and context ref are read out of this repository's own
workflows rather than restated in the script. The previous copy hardcoded both
and both went stale: the schema version by four minor releases, the context
digest by two republications. There is now one place to change either.
@ExtraToast ExtraToast added the type: refactor Code structure change without intended behavior change. label Aug 20, 2026
@ExtraToast ExtraToast self-assigned this Aug 20, 2026
@ExtraToast
ExtraToast merged commit e27c43d into main Aug 20, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: refactor Code structure change without intended behavior change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant